package ch01.observer;

import java.util.Observable;

/**
 *  观察者模式
 * Created by zc on 2016/10/25.
 */
public class Tpeak extends Observable {
    protected double value;

    public Tpeak(double value) {
        this.value = value;
    }

    public double getValue(){
        return value;
    }

    public void setValue(double value){
        this.value = value;
        setChanged();
        notifyObservers();
    }
}
